package com.digitalchina.lxnsy.activity.farmTrain;

import android.webkit.JavascriptInterface;

import com.digitalchina.lxnsy.base.BaseHtmlActivity;

/**
 * ================================================
 * 项目名称：android
 * 类描述：机构类型选择
 * 创建人：yzm
 * 创建时间：2020/1/8 17:26
 * 修改备注：
 * ================================================
 */
public class OrgSelectTypeActivity extends BaseHtmlActivity {

    @Override
    protected void loadHtml() {
        webView.addJavascriptObject(new JsApi(), null);
        loadUrl("train-org-select-type");
        setTitle("机构类型选择");
        setRightText("保存");
    }

    @Override
    public void rightOnClick() {
        callJsMethod("save");
    }

    public class JsApi {

        //保存
        @JavascriptInterface
        public void save(Object msg) {
            setResult(RESULT_OK);
            finish();
        }
    }
}
